<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: LV
  Date: 2016/7/22
  Time: 14:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <%--<meta charset="UTF-8">--%>
    <%--<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">--%>
    <%--<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />--%>
    <%--<!-- 全屏 -->--%>
    <%--<meta name="apple-mobile-web-app-capable" content="yes" />--%>
    <%--<!-- 上方栏显示 -->--%>
    <%--<meta name="apple-mobile-web-app-status-bar-style" content="black" />--%>
    <%--<!-- 不自动识别号码 -->--%>
    <%--<meta name="format-detection" content="telephone=no">--%>
    <%--<link href="public_skin/css/reset.css" rel="stylesheet">--%>
    <%--<link href="public_skin/css/shop_style.css" rel="stylesheet">--%>
    <%--<script src="../public_skin/js/jquery-1.11.1.min.js" type="text/javascript"></script>--%>
    <%--<script src="public_skin/js/shop.common.js" type="text/javascript"></script>--%>
    <title>订单管理</title>
</head>
<body>
<%--<header>--%>
<%--<h1>订单管理</h1>--%>
<%--<a href="javascript:;"></a>--%>
<%--</header>--%>
<article class="viewports">
    <div class="tab_menu">
        <div class="mt layout-box b-ffffff tac">
            <a class="box-col " href="${ctx}/userOrder/getAllOrdersByShopId?sid=${shopId}">全部订单</a>
            <c:if test="${orderStatus==0}">
                <a class="box-col curr" href="${ctx}/userOrder/getAllOrdersByStatus?sid=${shopId}&status=0">待付款</a>
                <a class="box-col" href="${ctx}/userOrder/getAllOrdersByStatus?sid=${shopId}&status=2">待收货</a>
                <a class="box-col" href="${ctx}/userOrder/getAllOrdersByStatus?sid=${shopId}&status=-1">已关闭</a>
            </c:if>
            <c:if test="${orderStatus==2}">
                <a class="box-col " href="${ctx}/userOrder/getAllOrdersByStatus?sid=${shopId}&status=0">待付款</a>
                <a class="box-col curr" href="${ctx}/userOrder/getAllOrdersByStatus?sid=${shopId}&status=2">待收货</a>
                <a class="box-col" href="${ctx}/userOrder/getAllOrdersByStatus?sid=${shopId}&status=-1">已关闭</a>
            </c:if>
            <c:if test="${orderStatus==-1}">
                <a class="box-col " href="${ctx}/userOrder/getAllOrdersByStatus?sid=${shopId}&status=0">待付款</a>
                <a class="box-col" href="${ctx}/userOrder/getAllOrdersByStatus?sid=${shopId}&status=2">待收货</a>
                <a class="box-col curr" href="${ctx}/userOrder/getAllOrdersByStatus?sid=${shopId}&status=-1">已关闭</a>
            </c:if>
        </div>
        <ul class="mc list_item c3">
            <c:forEach items="${orderModelList}" var="order">
                <li class="odr_t odr_b mb10">

                    <a href="${ctx}/userOrder/getOrderInformation?oid=${order.oOrder.orderId}">
                        <div class="plr20">
                            订单号：${order.oOrder.orderNum}
                        </div>

                        <c:forEach items="${order.orderProductsEntityList}" var="product">
                            <div class="layout-box p20 odr_b">
                                <div class="ith_img usernane_img140 mr20">
                                    <span class="bg_span" style="background-image:url(${product.image});"></span>
                                </div>
                                <div class="box-col">
                                    <h2 class="fs28 hgt2">${product.title} ${product.attribute}</h2>
                                    <div class="fs24 mt20 lh1">
                                        <span class="c-cb1448">&yen;${product.price}</span>
                                <span class="r ">
                                    &times;${product.quantity}
                                    </span>
                                    </div>
                                </div>
                            </div>
                        </c:forEach>
                    </a>

                    <div class="plr20 tar odr_b">共${order.orderProductNum}件商品 实付款：&yen;${order.oOrder.paymentMoneyAmount}(邮费:${order.oOrder.totalFreightAmount})</div>
                    <div class="plr20">
                        <c:if test="${order.oOrder.orderStatus==0}">
                            <span class="c-cb1448">待付款</span>
                        <span class="r">
                            <a class="odr2 r5 ptb5_lr15" href="${ctx}/userOrder/cancelOrder?oid=${order.oOrder.orderId}">取消订单</a>
                             <a class="b-2db22d cf r5 ptb5_lr30" href="${ctx}/shopping/settleAccountByUser?oid=${order.oOrder.orderId}">去支付</a>
                        </span>
                        </c:if>
                        <c:if test="${order.oOrder.orderStatus==1}">
                            <span class="c-cb1448">已付款</span>
                         <span class="r">
                            <a class="odr2 r5 ptb5_lr15" href="${ctx}/userOrder/applyRefund?oid=${order.oOrder.orderId}">申请退款</a>
                             <a class="b-2db22d cf r5 ptb5_lr30" href="#">提醒发货</a>
                        </span>
                        </c:if>
                        <c:if test="${order.oOrder.orderStatus==2}">
                            <span class="c-cb1448">已发货</span>
                         <span class="r">
                            <a class="odr2 r5 ptb5_lr15" href="${ctx}/userOrder/applyRefund?oid=${order.oOrder.orderId}">申请退款</a>
                             <a class="b-2db22d cf r5 ptb5_lr30" href="${ctx}/userOrder/confirmReceiveGoods?oid=${order.oOrder.orderId}">确认收货</a>
                        </span>
                        </c:if>
                        <c:if test="${order.oOrder.orderStatus==3}">
                            <span class="c-cb1448">已确认</span>
                            <a class="odr2 r5 ptb5_lr15" href="${ctx}/userOrder/applyRefund?oid=${order.oOrder.orderId}">申请退款</a>
                        </c:if>
                        <c:if test="${order.oOrder.orderStatus==-1}">
                            <span class="c-cb1448">已取消</span>
                        </c:if>

                    </div>
                </li>
            </c:forEach>
        </ul>
    </div>
</article>
</body>
</html>
